<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>日志开关基本信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/systemStatic/style/admin.css">
    <link rel="stylesheet" href="${ctx}/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/css/public.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
</head>
<body>

<script type="text/html" template>
<form class="layui-form"  requrl="{{ serverPath.systemPath + layui.setter.sysLinkPath}}sysLogSwitch/get" style="padding: 10px;width: 440px;overflow: auto;" lay-filter="sysLogSwitchDataForm">
    <input type="txt" name="id" class="id" fieldname="id" hidden style="display: none;">

         <div class="layui-form-item"  >
             <label class="layui-form-label">模块名称</label>
             <div class="layui-input-block">
                 <input type="text" name="model"  placeholder="请输入模块名称" autocomplete="off" class="layui-input" maxlength="25" fieldname="model">
                 <input type="hidden" name="fromType"  value="1" class="layui-input " maxlength="50" fieldname="fromType">
             </div>
         </div>
         <div class="layui-form-item"  >
             <label class="layui-form-label">状态</label>
             <div class="layui-input-block">
                 <input type="radio" name="status" fieldname="status" value="0" title="关闭" checked>
                 <input type="radio" name="status" fieldname="status" value="1" title="开启">
             </div>
         </div>

         <div class="layui-form-item"  >
             <label class="layui-form-label">备注</label>
             <div class="layui-input-block">
                 <input type="text" name="memo"  placeholder="请输入备注" autocomplete="off" class="layui-input " maxlength="150" fieldname="memo">
             </div>
         </div>
    <div class="layui-form-item" style="position:absolute;bottom:0;left: 10%;margin-top: 10px">
        <div class="layui-input-block">
            <a lay-submit lay-filter="sysLogSwitch" class="layui-btn btn-n" requrl="{{serverPath.systemPath + layui.setter.sysLinkPath}}sysLogSwitch/save">提交</a>
            <button type="reset" id="closeWindow" class="layui-btn btn-n layui-btn-danger btn-save">取消</button>
        </div>
    </div>
</form>
</script>
<script src="${ctx}/public/component.js" type="text/javascript"></script>
<script src="${ctx}/layui/layui.js"></script>
<script>

    layui.config({
        base: serverPath.systemPath + staticPath.systemPath //静态资源所在路径
    }).extend({
        index: 'index' //主入口模块
    }).use(['index','common','jquery'], function () {
        var $ = layui.jquery;
        //关闭当前页面
        $("#closeWindow").click(function () {
            parent.layer.close(parent.layer.getFrameIndex(window.name));
        });

        var common = layui.common;
        common.updateForm({
            name:'sysLogSwitchDataForm',
            idValue:"${id}",
            primary:"id",
            updateCallback:function (data) {
                if (common.filterRecord(data)) {
                    layer.alert(data.msg, function(index) {
                        layer.close(index);
                        window.parent.layui.table.reload('sysLogSwitchTable');
                        window.parent.layer.close(parent.layer.getFrameIndex(window.name));
                    });
                } else {
                   layer.alert(data.msg);
                }
                return false;
            }
        });
    });
</script>
</body>
</html>